<?php

namespace CMBUBank\Common;

/**
 * 应用基础类
 */
class Construct
{
    protected $gateway = '';

    protected $timeout = 5;

    protected $charset = 'utf-8';

    protected $format = 'json';

    protected $httpDebug = false;

    protected $logsDir = '';

    protected $proxy = '';

    public function setGateway(string $gateway): self
    {
        $this->gateway = $gateway;
        return $this;
    }

    public function setTimeout(int $timeout): self
    {
        $this->timeout = $timeout;
        return $this;
    }

    public function setCharset(string $charset): self
    {
        $this->charset = $charset;
        return $this;
    }

    public function setFormat(string $format): self
    {
        $this->format = $format;
        return $this;
    }

    public function setHttpDebug(bool $httpDebug): self
    {
        $this->httpDebug = $httpDebug;
        return $this;
    }

    public function setLogsDir(string $logsDir): self
    {
        $this->logsDir = $logsDir;
        return $this;
    }

    public function setProxy(string $proxy): self
    {
        $this->proxy = $proxy;
        return $this;
    }
}
